<template>
	<view class='information'>
		<view class="inform">
			<view class="in_message">
				<text>装修审批列表</text>
				<u-icon size="40" name="plus" @click="addinfo"></u-icon>
			</view>
			<view class="info_list">
				<view class="item">
					<view class="nav_name"><text>天辰盛世</text></view>
					<view class="item_left">
						<view class="info_name">黄先生</view>
						<view class="dong">位置：14栋1403号房</view>
						<view class="wuye">小区物业：天辰帮里</view>
						<view class="del_info">
							<u-button @click="btnClick" data-name="3333" :loading="loading" :plain="plain" :shape="shape"
								:size="size" :ripple="ripple" :hairLine="hairLine" :type="type">审核中</u-button>
						</view>
					</view>
					
				</view>
			</view>
			<view class="in_info">
				<block v-for="(item,index) in data" :key='index'>
					<view class="in_inf">
						小区信息
					</view>
					<view class="in_item">
						<view>小区名称</view>
						<view class="item_color">{{item.name}}</view>
					</view>
					<view class="in_item">
						<view>物业名称</view>
						<view class="item_color">{{item.developer}}</view>
					</view>
					<view class="in_item">
						<view>物业编号</view>
						<view class="item_color">{{item.total_owner}}</view>
					</view>
					<view class="in_item">
						<view>公司地址</view>
						<view class="item_color in_number">
							<view class="">{{item.address}}</view>
							<!-- <view class="">309号-359号</view> -->
						</view>
					</view>

					<view class="in_item">
						<view>联系电话</view>
						<view class="item_color">{{item.update_time}}</view>
					</view>
				</block>
			</view>
			<!-- <view class="baccolor"></view> -->
		</view>


	</view>
</template>

<script>
	export default {
		props: {},
		data() {
			return {
				Height: 0,
				data: [], //列表数据
				code: '',
				hairLine: true,
				type: 'success',
				size: 'mini',
				shape: 'square',
				plain: false,
				ripple: false,
				loading: false
			};
		},
		computed: {},
		onLoad(data) {
			// console.log(data.code)
			this.code = data.code
			this.getxinxi()
			this.showxiaoqu()
		},
		methods: {
			// 删除事件
			btnClick() {
				this.$u.toast('按钮被点击')
				location.reload()
			},
			// 新增事件
			addinfo(){
				this.$u.toast("新增功能")
				uni.navigateTo({
					url:"../properties/properties"
				})
			},
			//数据显示
			async showxiaoqu() {
				let res = await this.request({
					url: "/v1/communities",
					method: "GET",
					data: {
						"filter[code]": this.code
					}
				})
				this.data = res.data
			},
			getxinxi() {
				uni.getSystemInfo({
					success: function(res) {
						let winheight = res.windowHeight
					}
				})
			}
		},
	};
</script>

<style lang="less" scoped>
	.information {
		margin: 0 30rpx;
		.info_list{
			height: 100%;
			padding-top: 30rpx;
			.item{
				height: 200rpx;
				border: 1px solid #CCCCCC;
				border-radius: 10rpx;
				margin-bottom: 30rpx;
				.nav_name{
					width: 100%;
					padding: 10rpx 0;
					background-color: #07BB07;
					color: #FFFFFF;
					font-size: 28rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}
				.item_left{
					padding: 0 10rpx;
					position: relative;
					.info_name,.dong,.wuye{
						font-size: 30rpx;
						margin-bottom: 8rpx;
					}
					.del_info{
						position: absolute;
						right: 15rpx;
						bottom: 0;
					}
					
				}
				
			}
		}
		.in_message {
			height: 100rpx;
			font-size: 44rpx;
			font-weight: 700;
			line-height: 100rpx;
			border-bottom: 1rpx solid #e6e6e6;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.in_info {
			.in_inf {
				margin-top: 20rpx;
				font-size: 35rpx;
				font-weight: 700;
			}

			.in_item {
				font-size: 30rpx;
				margin: 36rpx 0;
				display: flex;
				justify-content: space-between;

				.item_color {
					color: #808080;
				}
			}
		}
	}

	.in_number {
		width: 480rpx;
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
	}

	.inform {
		background-color: #FFFFFF;
		height: 540rpx;
		// display: flex;
		// flex-direction: column;
	}

	.baccolor {
		height: 300rpx;
		width: 100%;
		background-color: #C8C7CC;
	}
</style>
